﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace BasePlatformNetAgent
{
	[Serializable][JsonObject(MemberSerialization.OptIn)]
	public class ShareMessage
	{
		private string ioVersion = "v1.0.2 @ 2019.1.8";

		private string _id = "";
		private string _type = "";
		private string _value = "";
		private string[] _parameters = new string[] { };
		private bool _handled = false;
		private int[] _payload = new int[] { };
		private string _payloadStr = "";
		private byte[] _payloadBytes = new byte[] { };

		[JsonProperty]
		public string Id
		{
			get { return _id; }
			set { _id = value; }
		}

		[JsonProperty]
		public string Type
		{
			get { return _type; }
			set { _type = value; }
		}

		[JsonProperty]
		public string Value
		{
			get { return _value; }
			set { _value = value; }
		}

		[JsonProperty]
		public string[] Parameters
		{
			get { return _parameters; }
			set { _parameters = value; }
		}

		[JsonProperty]
		public bool Handled
		{
			get { return _handled; }
			set { _handled = value; }
		}

		[JsonProperty]
		public int[] PayloadData
		{
			get { return _payload; }
			set { _payload = value;	}
		}

		[JsonProperty]
		public string PayloadStr
		{
			get
			{
				return _payloadStr;
			}
			set
			{
				_payloadStr = value;
			}
		}

		public byte[] PayloadBytes
		{
			get
			{
				return _payloadBytes;
			}
			set
			{
				_payloadBytes = value;
			}
		}
	}

	public class MessageType
	{
		public const string BaseMessage = "BaseMessage";

		public const string IBlueMessage = "IBlueMessage";

		public const string LedDebugMessage = "LedDebugMessage";
	}

	public class MessageValue
	{
		#region iBluePlayer

		public const string Base_Regist = "Base_Regist";

		public const string Base_UnRegist = "Base_UnRegist";

		public const string IBlue_Test = "iTest";

		public const string IBlue_StartSendDispData = "iStart";

		public const string IBlue_StopSendDispData = "iStop";

		public const string IBlue_PauseSendDispData = "iPause";

		public const string IBlue_ResumeSendDispData = "iResume";

		public const string IBlue_ChangeCaptureArea = "iChange";

		public const string IBlue_ChangeCaptureFps = "iChangeCaptureFps";

		public const string IBlue_SetAddrMapEnable = "iSetAddrMapEnable";

		public const string IBlue_ReadBinDataFromLwfOrJson = "iReadBinDataFromLwfOrJson";

		public const string IBlue_GetSubEquActiveState = "iGetSubEquActiveState";

		public const string IBlue_CloseAgent = "iCloseAgent";

		public const string IBlue_SetUseSwitch = "iSetUseSwitch";

		public const string IBlue_ReadSwitchConfigFile = "iReadSwitchConfigFile";

		public const string IBlue_ShowHardConfigForm = "iShowHardConfigForm";

		public const string IBlue_GetAddrMapParameter = "iGetAddrMapParameter";

		public const string IBlue_GetAddrMapTable = "iGetAddrMapTable";

		public const string IBlue_GetAgentVersion = "iGetAgentVersion";

		public const string IBlue_GetDeviceChainJson = "iGetDeviceChainJson";

		public const string IBlue_GetDeviceChainStatusJson = "iGetDeviceChainStatusJson";

		public const string IBlue_GetDeviceChainDetailJson = "iGetDeviceChainDetailJson";

		public const string IBlue_SetPlayingState = "iSetPlayingState";

		public const string IBlue_GetConfigExpandState = "iGetConfigExpandState";

		public const string IBlue_SetProgramBrightness = "iSetProgramBrightness";

		public const string IBlue_GetSubConfigData = "iGetSubConfigData";

		public const string IBlue_SetMcuDispParameter = "iSetMcuDispParameter";

		public const string IBlue_SetUserColorType = "iSetUserColorType";

		public const string IBlue_SetAddrMapDatPlayingMask = "iSetAddrMapDatPlayingMask";

        public const string IBlue_SetUserLanguage = "iSetUserLanguage";

        public const string IBlue_StartQueryArtDeviceChain = "iStartQueryArtDeviceChain";

        public const string IBlue_GetBaseArtDeviceChain = "iGetBaseArtDeviceChain";

        public const string IBlue_GetCurrentArtDeviceChain = "iGetCurrentArtDeviceChain";

        public const string IBlue_SetCurrentArtDeviceChainToBase = "iSetCurrentArtDeviceChainToBase";

        public const string IBlue_GetErrorArtDevice = "iGetErrorArtDevice";

        public const string IBlue_GetArtDeviceDetail = "iGetArtDeviceDetail";

		#endregion

		#region LedDebug
	
		public const string LED_Test = "ledTest";

		public const string LED_GetSubControlNum = "ledGetSubControlNum";

		public const string LED_SetEffectSubAndPort = "ledSetEffectSubAndPort";

		#endregion
	}
}
